﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using KDS.Mes.Web.Models.Common.Modals
@using KDS.Mes.Web.Models.Plans

@model CreateOrEditPlanModalViewModel

@* 初始化头部 *@
@Html.Partial("~/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("EditPlan") + ": " + Model.Plan.LineId) : L("CreatePlan")))

<!--html代码区域-->
<div class="modal-body">
    <form name="planInformationsForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Plan.Id" />
        <div>

            <div hidden="hidden">
                @if (Model.IsEditMode)
            {
                    <input type="hidden" name="Id" value="@Model.Plan.Id" />
                }
            </div>

            <div class="form-group ">
                <label for="lineIdEdit">@L("LineId")</label>
                @Html.DropDownList("LineId", Model.Lines.Select(a => a.ToSelectListItem()), new
           {
               @class = "form-control selectpicker",
               data_live_search = "true",
               title = L("PlaaseSelect"),
               id = "lineIdEdit"
           })
            </div>

            <div class="form-group ">
                <label for="alcCodeIdEdit">@L("AlcCodeId")</label>
                @Html.DropDownList("AlcCodeId", Model.AlcCodes.Select(a => a.ToSelectListItem()), new
           {
               @class = "form-control selectpicker",
               data_live_search = "true",
               title = L("PlaaseSelect"),
               id = "alcCodeIdEdit"
           })
            </div>

            <div class="form-group ">
                <label for="planModeIdEdit">@L("PlanModeId")</label>
                @Html.DropDownList("PlanModeId", Model.PlanModes.Select(a => a.ToSelectListItem()), new
                    {
                        @class = "form-control selectpicker",
                        data_live_search = "true",
                        id = "planModeIdEdit"
                    })
            </div>

            <div class="form-group ">
                <label>@L("Priority")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.Plan.Priority.ToString().IsNullOrEmpty() ? "" : " edited")" type="text" name="Priority" value="@Model.Plan.Priority" required />
            </div>
            <div class="form-group ">
                <label>@L("Priority")   <span class="required"> * </span>	 	</label>
                @Html.DropDownList("PlanModeId", Model.PlanModes.Select(a => a.ToSelectListItem()), new
            {
                @class = "form-control selectpicker",
                data_live_search = "true",
                id = "planModeIdEdit"
            })
            </div>
            <div class="form-group ">
                <label>@L("Priority") </label>
                <input class="maxlength-handler form-control @(Model.Plan.Remarks.ToString())" type="text" name="Remarks" value="@Model.Plan.Remarks" />
            </div>

            <div class="form-group ">
                <label>@L("PlanQty")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.Plan.PlanQty.ToString().IsNullOrEmpty() ? "" : " edited")" type="text" name="PlanQty" value="@Model.Plan.PlanQty" required />
            </div>

            <div class="form-group ">
                <label>@L("PlanDate"):    <span class="required"> * </span> </label>
                <div class="input-group  date form_datetime">
                    <input type="text" name="PlanDate" value="@Model.Plan.PlanDate" readonly class="form-control">
                    <span class="input-group-btn">
                        <button class="btn default date-set" type="button">
                            <i class="fa fa-calendar"></i>
                        </button>
                    </span>
                </div>
            </div>
        </div>
    </form>
</div>
@Html.Partial("~/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")